# -*- coding: utf-8 -*-


def total_milliseconds(time_delta):
    milliseconds = (time_delta.days * 24 * 60 * 60 + time_delta.seconds) * 1000 + time_delta.microseconds / 1000.0
    return milliseconds